import React, { Component } from 'react';

import { getlist } from '@/api/http';

import TopLogo from './ui/TopLogo';
import Lunbo from './ui/Lunbo';
import TabExample from './ui/Tabs';
import Ghuddao from './ui/Ghuddao';
import Cuifengj from './ui/Cuifengj';
import BigPic from './ui/BigPic';
import BotLunbo from './ui/BotLunbo';


class index extends Component {
    state = {
        guahudao: [],
        // 吹风机照片
        cuifengji_pic: 'https://pic.flyco.net.cn/mall/cms/home/hairDrierBg.png?q=1?x-oss-process=style/cms-images',
        // 剪发器
        jianfaqi_pic: 'https://pic.flyco.net.cn/mall/cms/home/barberBg.png?x-oss-process=style/cms-images',
        // 烫发器
        tangfa_pic: 'https://pic.flyco.net.cn/mall/cms/home/hairironBg.png?x-oss-process=style/cms-images',
        // 插排
        chapai_pic: 'https://pic.flyco.net.cn/mall/cms/home/socketBg.png?x-oss-process=style/cms-images',
        // 修剪器
        xiujianqi_pic: 'https://pic.flyco.net.cn/mall/cms/home/hairballBg.png?x-oss-process=style/cms-images',

    }
    componentDidMount() {
        getlist(1).then(e => {
            this.setState({
                guahudao: e.data.data.list
            })
        })
    }
    render() {
        return (
            <div>
                <TopLogo />
                <Lunbo />
                {/* tab切换 */}
                <TabExample />
                {/* 刮胡刀 */}
                <Ghuddao guahudao={this.state.guahudao} />
                {/* 吹风机照片 */}
                <Cuifengj pic={this.state.cuifengji_pic} index='4' qh={this.props.gaib} />
                {/* 剪发器 */}
                <Cuifengj pic={this.state.jianfaqi_pic} index='5' qh={this.props.gaib} />
                {/* 烫发器 */}
                <Cuifengj pic={this.state.tangfa_pic} index='13' qh={this.props.gaib} />
                {/* 插排 */}
                <Cuifengj pic={this.state.chapai_pic} index='102' qh={this.props.gaib} />
                {/* 修剪器 */}
                <Cuifengj pic={this.state.xiujianqi_pic} index='8' qh={this.props.gaib} />
                <BigPic />
                <BotLunbo />
            </div>
        );
    }
}

export default index;
